﻿using System;

namespace PollyDemo
{
    class Program
    {
        private static SimplePollyDemo myPollyDemo = new SimplePollyDemo();
        static void Main(string[] args)
        {

            try
            {
                //myPollyDemo.PollyFallBack();
                //Console.WriteLine(myPollyDemo.PollyFallBackString());
                // myPollyDemo.WhereExceptionPolly();
                // myPollyDemo.PolicyRetry();
                // myPollyDemo.CircuitBreaker();
                // myPollyDemo.PolicyWarp();
                // myPollyDemo.PolicyTimeOut();

                //var valueTask = myPollyDemo.PollyAsync().Result;
                //Console.WriteLine($"bytrs的长度是：{valueTask.Length}");

                myPollyDemo.PollyTaskAsync().Wait();
            }
            catch (Exception ex)
            {
                Console.WriteLine("Catch的异常信息");
                Console.WriteLine(ex.Message);
            }
            Console.ReadKey();
           
        }
    }
}
